1. Field of the Invention
The invention relates to a controller for a wire electric discharge machine, specifically a controller for a wire electric discharge machine suitable for finishing in electric discharge machining.
2. Description of the Related Art
FIG. 10 is a block diagram showing parts relevant to feed control in a conventional wire electric discharge machine. A discharge pulse generator 1 is for applying a discharge pulse voltage to a gap between a wire electrode 4 and a workpiece 5 for electric discharge machining, and comprises a direct-current power source, a circuit including a switching element such as a transistor, a charge and discharge circuit for a capacitor, and others. Conductive brushes 2 and 3 are for making a current flow through the wire electrode, and connected to one of the two terminals of the discharge pulse generator 1. The workpiece 5 is connected to the other terminal of the discharge pulse generator 1. The discharge pulse generator 1 applies a pulse voltage between the wire electrode 4, which is traveling, and the workpiece 5.
A discharge gap detection unit 6 is connected to the wire electrode 4 and the workpiece 5. The discharge gap detection unit 6 detects a pulse-like gap voltage of a length of about several microseconds from the discharge pulse generator 1. The detected voltage value is processed by an averaging circuit 21 for adjustment to the processing speed of a feed pulse arithmetic unit, and compared with an output of a reference voltage setting unit 22 to thereby obtain a voltage deviation. On the basis of the obtained voltage deviation, the feed pulse calculation unit 13 generates a pulse train having a controlled pulse interval, and sends the pulse train to a feed pulse distribution unit 12. The feed pulse distribution unit 12 divides this pulse train into drive pulses for an X-axis and drive pulses for a Y-axis according to machining programs, and sends the drive pulses to an X-axis motor control unit 10 and a Y-axis motor control unit 11 for driving a table on which the workpiece 5 is placed.
When the workpiece 5 and the wire electrode 4 comes close enough to each other to produce electric discharge, a discharge pulse current flows from the discharge pulse generator 1 and electric discharge starts. After the electric discharge, an appropriate off time is taken so that the gap is cooled. Then, the discharge pulse voltage is applied again. By repeating this operation cycle, electric discharge machining is performed, where each time the discharge pulse is generated, a part of the workpiece 5 is removed. The detected gap voltage is processed in the averaging circuit 21, and compared with an output of the reference voltage setting unit 22 to obtain a voltage deviation. In the feed pulse calculation unit 13, a speed command value is obtained by multiplying the voltage deviation by a gain that is determined separately. When the average machining voltage is higher than the reference voltage value and the deviation from the reference voltage value is large, it is determined that the gap is becoming larger, and the feed speed is increased. When the average machining voltage decreases and the deviation decreases, it is determined that the gap is becoming narrower, and the feed speed is decreased. When the average machining voltage is equal to the reference voltage value and the deviation is zero, feed control is so performed that the feed speed will be zero. This means that the feed speed control is so performed that the machining voltage will come close to a fixed value. If the average machining voltage is lower than a predetermined voltage value, it is determined that there is a short circuit, and steps such as stopping the application of the discharge pulse voltage and following the track backward are taken.
There is known another feed control mode in which when the average machining voltage is equal to the reference voltage value, the feed speed is set at a predetermined reference feed speed. When the average machining voltage is higher than the reference voltage value, the feed speed is set at a speed higher than the reference feed speed. When the average machining voltage is lower than the reference voltage value, the feed speed is set at a speed lower than the reference feted speed.
An invention in which the above-described two feed control modes are applied to roughing (first cutting) and finishing, separately, to improve surface roughness is also known (see JP 3231567B). In this invention, in first cutting where a contour is first cut, a mode is taken in which when the voltage difference is zero, feed is stopped, and when the voltage difference is reversed, feed is reversed. In finishing, a mode is taken in which when the average machining voltage is equal to the reference voltage value and the voltage difference is zero, the feed speed is set at a predetermined feed speed. Thus, the gain in finishing is made smaller than the gain in intermediate finishing. Specifically, in the mode in which the feed speed is set-at zero when the voltage difference is zero, the feed speed corresponding to an appropriate machining voltage changes when the gain is changed. Thus, by shifting the feed speed from zero, which corresponds to the voltage difference of zero on the average machining voltage versus feed speed gain curve, to a predetermined speed, the gain is lowered to improve the surface roughness.
Any of the above-mentioned modes, that is, the mode in which the feed speed is set at zero when the voltage difference between the average machining voltage and the reference voltage is zero, the mode in which the feed speed is set at a predetermined feed speed when the voltage difference is zero, and the mode in which these two modes are combined is feed control in a constant average machining voltage mode.
Besides this control mode, a constant feed speed mode in which the feed speed is simply kept at a predetermined speed is also known.
The constant average machining voltage mode is originally intended to improve the speed of first cutting in which a contour of a workpiece is first cut, and prevent breaking of a wire due to electric discharge concentration. Hence, when the constant average machining voltage mode is used in finishing, namely second and subsequent cutting in which electric discharge machining is performed using a smaller discharge pulse current in order to improve surface roughness and accuracy after the first cutting, feed control needs to be performed with various adjustments so that change in the amount of machining per unit time will be reduced to the lowest possible level to stabilize the discharge pulse density.
FIG. 11 is an illustration for explaining machining in the constant average machining voltage mode. Let us suppose that a surface of a workpiece 5 having a thickness t machined by first cutting as shown in FIG. 11 is machined at a reference voltage Vs. When the widths of portions to be removed are G(x+1) and Gx and the average machining voltages in machining those portions are V(x+1) and V(x), respectively, the distances per unit time δ(x+1) and δx that the wire electrode moves relatively to those portions are as follows:δ(x+1)=(V(x+1)−Vs)*gainδx=(Vx−Vs)*gain.
Change in the amount of machining per unit time is expressed as(Gx*δx−G(x+1)*δ(x+1))*t.Hence, in order to reduce the change in the amount of machining per unit time to the lowest possible level, feed should be so performed that the following equation will be satisfied:Gx*δx=G(x+1)*δ(x+1).Thus, when the width G of a portion to be removed is small, the motion amount per unit time δ should be large, and when the width G of a portion to be removed is large, the motion amount per unit time δ should be small.
For this, it is most important that the change in voltage reflects the width of a portion to be removed more accurately. Also it is necessary to determine the gain corresponding to the change in voltage, appropriately.
Actually, change in the gap voltage is affected by factors other than the change in the amount of machining per unit distance. Specifically, when the feed control is not performed appropriately (this often happens during machining under the conventional control), the discharge pulse density becomes unstable, so that produced sludge is unevenly distributed in the gap, so that the gap voltage is more affected than it is affected by the real change in the amount of machining per unit distance. Once sludge is unevenly distributed and stays in the gap, discharge pulses are generated continuously due to the unevenly distributed sludge, which lowers the average machining voltage. As a result, the feed speed decreases, which leads to further increase in the discharge pulse density and results in so-called too much removal. When sludge is little and generates little discharge pulses, the average machining voltage increases. As a result, the feed speed increases and a so-called unmachined part remains.
As a result, irregularities such as undulation and lines are produced on the finished surface. An area which requires especially high finished surface accuracy is finished by using a small pulse current and increasing the number of times of electric discharge. In this case, since the discharge pulse density is more difficult to control, the above-mentioned tendency is stronger. Thus, in the feed control in finishing, improvement is demanded also for keeping the discharge pulse density constant.
Conventionally, in finishing, the feed control in the constant average machining voltage mode is performed generally. However, as described above, in this mode, since the change in average machining voltage cannot reflect the width of a portion to be removed sufficiently accurately, the feed does not have sufficient accuracy. Further, it is very difficult to select an appropriate gain according to the change in average machining voltage which corresponds to the change in the width of a portion to be removed. Thus, in the conventional control, stable surface accuracy cannot be obtained repeatedly, and the demand for improvement in finishing accuracy cannot be satisfied.
Also the machining in the constant feed speed mode has similar problems.
FIG. 12 is an illustration for explaining the machining in the constant feed speed mode. Let us suppose that a surface of a workpiece 5 having a thickness t machined by first cutting is finished at a speed SPD. Because of the constant feed speed mode, the distance per unit time that the wire electrode moves is constant regardless of the widths G(x+1) and Gx of portion to be removed. When this distance per unit time that the wire electrode moves is δx, the change in the amount of machining per unit time is expressed as(Gx−G(x+1))*δx*t.Hence, in the same period of time, more discharge pulses are applied to the portion having the width Gx than the portion having the width G(x+1). This leads to too high discharge pulse density, and lowers the machining accuracy.